import { defineConfig } from "vitepress";
import sidebar from "./sidebar";
import { vitepressPluginLegend } from "vitepress-plugin-legend";

export default defineConfig({
  title: "363045841 的博客",
  lang: "zh-CN",
  outDir: "./dist",
  base: "/boke/",
  markdown: {
    math: true,
    theme: {
      light: "github-light",
      dark: "github-dark",
    },
    config(md) {
      vitepressPluginLegend(md, {
        mermaid: true,
        markmap: true,
      });
    },
  },
  vite: {
    optimizeDeps: {
      include: ["mermaid"],
    },
    ssr: {
      noExternal: ["vuetify"],
    },
  },

  themeConfig: {
    nav: [
      {
        component: "MyCustomComponent",
        // 可选的 props 传递给组件
        props: {
          title: "My Custom Component",
        },
      },
    ],
    sidebar: sidebar,
    socialLinks: [
      { icon: "github", link: "https://github.com/363045841/vitepress_boke" },
      { icon: "gitee", link: "https://gitee.com/yyt363045841/boke-vitepress" },
    ],
    outline: {
      level: [3, 4], // 生成哪些级别的标题（比如 H2 和 H3）
      label: "文章", // 目录区域的标题
    },
    /* footer: {
      message: "苏ICP备2025165288号-1",
      copyright: "Copyright © 2024-present 363045841",
    }, */
  },
});
